//
//  UIButton+Category.swift
//  SinaWeibo
//
//  Created by 胡阳 on 16/5/31.
//  Copyright © 2016年 young4ever. All rights reserved.
//

import UIKit

extension UIButton {

    /**
     快速创建首页cell的按钮 
     */
    class func fastCreateButton(imgName: String, title: String) -> UIButton
    {
        let btn = UIButton(type: UIButtonType.Custom)
        btn.setBackgroundImage(UIImage(named:"timeline_card_bottom_background"), forState: UIControlState.Normal)
        btn.setImage(UIImage(named:imgName), forState: UIControlState.Normal)
        btn.titleLabel?.font = UIFont.systemFontOfSize(10)
        btn.titleEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0)
        btn.setTitle(title, forState: UIControlState.Normal)
        btn.setTitleColor(UIColor.darkGrayColor(), forState: UIControlState.Normal)
        return btn
    }

}